package com.hc.wdj.core.context;

import com.hc.wdj.core.HcManager;
import com.hc.wdj.core.context.model.HcRequest;
import com.hc.wdj.core.context.model.HcResponse;

/**
 * @author ryanwdj
 * @since 2024/11/16
 */
public class HcHolder {

    /**
     * 获取当前求求的hcContext上下文对象
     * @return
     */
    public static HcContext getContext(){
        return HcManager.getHcContextOrSecond();
    }

    public static HcRequest getRequest(){
        return HcManager.getHcContextOrSecond().getRequest();
    }

    public static HcResponse getResponse(){
        return HcManager.getHcContextOrSecond().getResponse();
    }
}
